import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
import persistedState from 'vuex-persistedstate'
export default new Vuex.Store({
  state: {
    tableData: [],
    
  },
  getters: {
  },
  mutations: {
    //添加
    addobj(state,obj){
      state.tableData.push(obj)
    },
    //删除
    delobj(state,obj){
      state.tableData.splice(obj,1)
    },
    //批量删除
    liangobj(state,obj){
      state.tableData.splice(obj)
    },

  },
  actions: {
  },
  modules: {
  },
  plugins: [persistedState()]
})
